#include "stdafx.h"
#include "FaxBackupLonginDlg.h"
#include "FaxBackupProgressDlg.h"

BOOL GetPassword(char* buffer, int bufferLen, BOOL super)
{
	BOOL ret = FALSE;
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	FaxBackupLonginDlg dlg;
	dlg.m_isSuper = super;
	if (IDOK == dlg.DoModal())
	{
		dlg.CopyPassword(buffer, bufferLen);
		ret = TRUE;
	}	
	return ret;
}

VOID ShowProgress()
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	FaxBackupProgressDlg::GetInstance()->DoModal();
}

//VOID ResetProgress()
//{
//	if (g_progressBarDlg)
//	{
//		g_progressBarDlg->Reset();
//	}	
//}

VOID HideProgress()
{
	AFX_MANAGE_STATE(AfxGetStaticModuleState());
	FaxBackupProgressDlg::GetInstance()->HideDlg();
}